<template>
	<!-- 公司信息组件-头部 -->
	<view class="componyheader_cntent flex aic">
		<image v-if="personData.img" :src="personData.img" mode=""></image>
		<image  v-if="!personData.img" src="@/static/touxiang.png" mode=""></image>
		<view class="componyheader_cntent_right">
			<text class="componyheader_cntent_right_title fonts18 fontw700 fontz">{{personData.title}}</text>
			<view class="flex componyheader_cntent_right_text aic" v-if="personData.bool==1">
				<image src="@/static/compass.png" mode=""></image>
				<text class="fontz fonts12 gray">{{dictFun(personData.companyType, "company_type")}} <text v-if="personData.companySize">|</text> {{dictFun(personData.companySize, "company_size")}} <text v-if="personData.companyType">|</text> {{ dictFun(personData.companyIndustry, "company_industry")}}</text>
			</view>
			<view class="flex componyheader_cntent_right_text aic" v-if="personData.bool==1">
				<image src="@/static/map-pin.png" mode=""></image>
				<text class="fontz fonts12 gray">{{personData.address}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		dictFuns
	} from "@/util/dictionary"
	export default {
		name:"ComponyHearder",
		props:["data"],
		data() {
			return {
				personData: {}
			}
		},
		watch: {
			//  如果需要第一次就执行监听 则需要设置：immediate: true
			data: {
				handler(newVal, oldVal) {
					this.personData = this.data
					console.log("componyHeader",this.personData);
				},
				immediate:true,
				deep: true
			},
		},
		created() {
			
		},
		methods: {
			dictFun(value, res) {
				return dictFuns(value, res)
			},
			string_arrFun(res) {
				console.log(res);
				let arrs = res ? res.split(",") : []
				return arrs
			}
		
		}
	}
</script>

<style lang="scss" scoped>
	.componyheader_cntent{
		padding: 12px 12px 14px 12px;
		width: calc(100% - 24px);
		height: 74px;
		background: #FFFFFF;
		border-radius: 0px 0px 0px 0px;
		opacity: 1;
		image{
			width: 70px;
			height: 70px;
			margin-right: 13px;
			border-radius: 50%;
			
		}
	}
	.componyheader_cntent_right_text{
		image{
			width: 12px;
			height: 12px;
			margin-right: 6px;
		}
		margin-top: 10px;
		
	}
</style>